<script setup></script>

<template>
  <div>
    <h1>Reg</h1>
    <div class="mb-4">
      <el-button type="primary">Primary</el-button>
      <el-button type="success" @click="btn2">Success</el-button>
    </div>
    <p v-for="(artical, index) in list" :key="'artical' + index">
      {{ artical.title }}
    </p>
  </div>
</template>
<script setup>
import { ref } from 'vue'
import axios from 'axios'
const list = ref([])
const btn2 = async () => {
  const path =
    'https://apis.tianapi.com/wxnew1234/index?key=c65cff44e82fc3b1d27622e80e0a1b6c&num=10'
  const { data: res } = await axios.get(path) // 只接收then部数据
  console.log(res)
}
</script>
